Performance analysis tools are the key contributors in identifying and resolving performance issues in complex architectures. Performance analysis tools are extensively used by different communities, including: hardware architects, compiler and performance tool developers, application and system writers.
In order for a performance tool to serve as a useful analysis utility, it must provide a convenient interface with the user. The interface may include graphic display, advanced search options, and interactive interface modes such as various statistical views, interactive call graphs, colourful views to help users identify bottlenecks, etc.
A performance analysis tool is applied to a program file to collect information on the behaviour of the program while it is run on a typical workload. The program may be, for example, an application program, a system program, hardware driver, etc
A program may contain a loop. A loop is a sequence of statements which is specified once but which may be carried out several times in succession. The code inside the loop (referred to as the body of the loop) is obeyed a specified number of times, once for each of a collection of items, or until some condition is met.
Providing an indication of a potential area of performance improvement in the code of the program can enable programmers to tune the performance of their applications. The behaviour of executed loops for each time the loop was invoked, is an important area of performance improvement.
A known method for analysing loops' behaviour at run-time is based on collecting a complete tracing of the loop.
Tracing utilities provide complete information about each executed instruction. For example, a loop containing a conditional jump instruction which was executed 100 times, will produce a tracing list comprised of consecutive 100 jump instructions. Trace information is, therefore, very large, non-scalable and requires a post-processing phase in order to produce the appropriate statistics about the program's behaviour.
As opposed to tracing utilities, profiling tools do not generate such large amount of information but rather attach a value next to each executed instruction, representing the number of times it was executed or the amount of time it took to complete. Following the above example, profiling tools will produce a single jump instruction accompanied by the number 100, representing the number of times it was executed, or by the number of cycles/tics it required in order to complete.
Another method for analysing run-time behaviour uses debuggers to try and analyse the loops' behaviour while executing the program on a step-by-step manner. Debugging tools enable the developer to run a given program in order to interactively learn about its behaviour at run-time. This method is done manually by the programmer and, therefore, not suitable for collecting global information on the program behaviour, making it hard, for example, to gather frequency statistics on executed instructions or loops.